package com.fuhe.studydemo;

import android.app.Activity;
import android.view.View;
import android.widget.Button;
import android.os.Bundle;
import com.fuhe.studydemo.custom.OffsetLayout;

public class OffsetActivity extends Activity {

    private OffsetLayout offsetView;
    private Button button_horizontal;
    private Button button_vertical;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_offset);

        initView();
    }

    private void initView() {
        offsetView = findViewById(R.id.offsetView);
        button_horizontal = findViewById(R.id.button_horizontal);
        button_vertical = findViewById(R.id.button_vertical);
    }

    public void offsetHorizontal(View v){
        offsetView.setmOffsetHorizontal(60);
    }

    public void offsetVertical(View v){
        offsetView.setmOffsetVertical(60);
    }
}
